package com.jacen.fzxs.service.impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jacen.fzxs.dao.IBaseDao;
import com.jacen.fzxs.dao.IWallCustomerDao;
import com.jacen.fzxs.entity.WallCustomerEntity;
import com.jacen.fzxs.service.IWallCustomerService;

/**
 * 墙体用户关系Service
 * @author Jacen
 *
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class WallCustomerService extends BaseService<WallCustomerEntity> implements IWallCustomerService {
	
	@Resource
	private IWallCustomerDao wallCustomerDao;
	
	@Override
	public IBaseDao<WallCustomerEntity> getDao() {
		// TODO Auto-generated method stub
		return wallCustomerDao;
	}

	@Transactional(readOnly = true)
	public List<WallCustomerEntity> getPage(int curPage, int pageSize ,Map<String, String> params) {
		return wallCustomerDao.getPage( (curPage - 1) * pageSize, curPage * pageSize, params);
	}

	@Transactional(readOnly = true)
	public long getCount(Map<String, ? extends Object> params) throws SQLException {
		return wallCustomerDao.getCount( params);
	}

}
